﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class Employee : ActiveRecordBase<Employee>
    {
		#region Const Definition
		
		public const string CONST_EmployeeID							= "EmployeeID";
		public const string CONST_Badge									= "Badge";
		public const string CONST_EName									= "EName";
		public const string CONST_CName									= "CName";
		public const string CONST_Email									= "Email";
		public const string CONST_CILAccount							= "CILAccount";
		public const string CONST_BD									= "BD";
		public const string CONST_BG									= "BG";
		public const string CONST_Title									= "Title";
		public const string CONST_Culture								= "Culture";
		public const string CONST_ReportTo								= "ReportTo";
		public const string CONST_Active								= "Active";
		public const string CONST_UpdateDate							= "UpdateDate";
		public const string CONST_CommentAllowed						= "CommentAllowed";
		public const string CONST_ASBOrLucent							= "ASBOrLucent";
		public const string CONST_DownloadAllowed						= "DownloadAllowed";
		public const string CONST_Phone									= "Phone";
		public const string CONST_Company								= "Company";
		public const string CONST_Location								= "Location";
		public const string CONST_ADAccount								= "ADAccount";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _employeeID;
        
        // Non Key
        private System.String _badge;
        private System.String _eName;
        private System.String _cName;
        private System.String _email;
        private System.String _cILAccount;
        private System.String _bD;
        private System.String _bG;
        private System.String _title;
        private System.String _culture;
        private System.String _reportTo;
        private System.Boolean _active;
        private Nullables.NullableDateTime _updateDate;
        private System.Boolean _commentAllowed;
        private System.Int32 _aSBOrLucent;
        private System.Boolean _downloadAllowed;
        private System.String _phone;
        private System.String _company;
        private System.String _location;
        private System.String _aDAccount;

        // Parents
        
        
		

        #endregion

        public Employee() {
               
        }
        public Employee(
            System.String badge
            ,System.String eName
            ,System.String cName
            ,System.String email
            ,System.String cILAccount
            ,System.String bD
            ,System.String bG
            ,System.String title
            ,System.String culture
            ,System.String reportTo
            ,System.Boolean active
            ,Nullables.NullableDateTime updateDate
            ,System.Boolean commentAllowed
            ,System.Int32 aSBOrLucent
            ,System.Boolean downloadAllowed
            ,System.String phone
            ,System.String company
            ,System.String location
            ,System.String aDAccount) : this() {
                
            this._badge = badge; 
            this._eName = eName; 
            this._cName = cName; 
            this._email = email; 
            this._cILAccount = cILAccount; 
            this._bD = bD; 
            this._bG = bG; 
            this._title = title; 
            this._culture = culture; 
            this._reportTo = reportTo; 
            this._active = active; 
            this._updateDate = updateDate; 
            this._commentAllowed = commentAllowed; 
            this._aSBOrLucent = aSBOrLucent; 
            this._downloadAllowed = downloadAllowed; 
            this._phone = phone; 
            this._company = company; 
            this._location = location; 
            this._aDAccount = aDAccount; 
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_EMPLOYEE_EMPLOYEEID")]
		#endif
        public System.Int32 EmployeeID {
            get { return this._employeeID; }
            set {  this._employeeID = value; }
        }
        
        // Non Key
        [Property]
        public System.String Badge {
            get { return this._badge; }
			set { if (value == null) return; if (value.Length > 50) this._badge = value.Substring(0,50); else this._badge = value; }	
        }
        
        [Property]
        public System.String EName {
            get { return this._eName; }
			set { if (value == null) return; if (value.Length > 50) this._eName = value.Substring(0,50); else this._eName = value; }	
        }
        
        [Property]
        public System.String CName {
            get { return this._cName; }
			set { if (value == null) return; if (value.Length > 50) this._cName = value.Substring(0,50); else this._cName = value; }	
        }
        
        [Property]
        public System.String Email {
            get { return this._email; }
			set { if (value == null) return; if (value.Length > 50) this._email = value.Substring(0,50); else this._email = value; }	
        }
        
        [Property]
        public System.String CILAccount {
            get { return this._cILAccount; }
			set { if (value == null) return; if (value.Length > 50) this._cILAccount = value.Substring(0,50); else this._cILAccount = value; }	
        }
        
        [Property]
        public System.String BD {
            get { return this._bD; }
			set { if (value == null) return; if (value.Length > 50) this._bD = value.Substring(0,50); else this._bD = value; }	
        }
        
        [Property]
        public System.String BG {
            get { return this._bG; }
			set { if (value == null) return; if (value.Length > 50) this._bG = value.Substring(0,50); else this._bG = value; }	
        }
        
        [Property]
        public System.String Title {
            get { return this._title; }
			set { if (value == null) return; if (value.Length > 200) this._title = value.Substring(0,200); else this._title = value; }	
        }
        
        [Property]
        public System.String Culture {
            get { return this._culture; }
			set { if (value == null) return; if (value.Length > 50) this._culture = value.Substring(0,50); else this._culture = value; }	
        }
        
        [Property]
        public System.String ReportTo {
            get { return this._reportTo; }
			set { if (value == null) return; if (value.Length > 50) this._reportTo = value.Substring(0,50); else this._reportTo = value; }	
        }
        
        [Property]
        public System.Boolean Active {
            get { return this._active; }
			set { this._active = value; }
        }
        
        [Property]
        public Nullables.NullableDateTime UpdateDate {
            get { return this._updateDate; }
			set { this._updateDate = value; }
        }
        
        [Property]
        public System.Boolean CommentAllowed {
            get { return this._commentAllowed; }
			set { this._commentAllowed = value; }
        }
        
        [Property]
        public System.Int32 ASBOrLucent {
            get { return this._aSBOrLucent; }
			set { this._aSBOrLucent = value; }
        }
        
        [Property]
        public System.Boolean DownloadAllowed {
            get { return this._downloadAllowed; }
			set { this._downloadAllowed = value; }
        }
        
        [Property]
        public System.String Phone {
            get { return this._phone; }
			set { if (value == null) return; if (value.Length > 50) this._phone = value.Substring(0,50); else this._phone = value; }	
        }
        
        [Property]
        public System.String Company {
            get { return this._company; }
			set { if (value == null) return; if (value.Length > 50) this._company = value.Substring(0,50); else this._company = value; }	
        }
        
        [Property]
        public System.String Location {
            get { return this._location; }
			set { if (value == null) return; if (value.Length > 50) this._location = value.Substring(0,50); else this._location = value; }	
        }
        
        [Property]
        public System.String ADAccount {
            get { return this._aDAccount; }
			set { if (value == null) return; if (value.Length > 50) this._aDAccount = value.Substring(0,50); else this._aDAccount = value; }	
        }
        
        
        // Parent Relationships
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public Employee Clone()
		{
			Employee newEmployee = new Employee();
			
            newEmployee.Badge = this._badge; 
            newEmployee.EName = this._eName; 
            newEmployee.CName = this._cName; 
            newEmployee.Email = this._email; 
            newEmployee.CILAccount = this._cILAccount; 
            newEmployee.BD = this._bD; 
            newEmployee.BG = this._bG; 
            newEmployee.Title = this._title; 
            newEmployee.Culture = this._culture; 
            newEmployee.ReportTo = this._reportTo; 
            newEmployee.Active = this._active; 
            newEmployee.UpdateDate = this._updateDate; 
            newEmployee.CommentAllowed = this._commentAllowed; 
            newEmployee.ASBOrLucent = this._aSBOrLucent; 
            newEmployee.DownloadAllowed = this._downloadAllowed; 
            newEmployee.Phone = this._phone; 
            newEmployee.Company = this._company; 
            newEmployee.Location = this._location; 
            newEmployee.ADAccount = this._aDAccount; 
			return newEmployee;
		}
    }
}



